<HTML><HEAD><META CONTENT="text/html; charset=UTF-8" HTTP-EQUIV="Content-Type"/><TITLE>EMMA Coverage Report</TITLE><STYLE TYPE="text/css"> TABLE,TD,TH {border-style:solid; border-color:black;} TD,TH {background:white;margin:0;line-height:100%;padding-left:0.5em;padding-right:0.5em;} TD {border-width:0 1px 0 0;} TH {border-width:1px 1px 1px 0;} TR TD.h {color:red;} TABLE {border-spacing:0; border-collapse:collapse;border-width:0 0 1px 1px;} P,H1,H2,H3,TH {font-family:verdana,arial,sans-serif;font-size:10pt;} TD {font-family:courier,monospace;font-size:10pt;} TABLE.hdft {border-spacing:0;border-collapse:collapse;border-style:none;} TABLE.hdft TH,TABLE.hdft TD {border-style:none;line-height:normal;} TABLE.hdft TH.tl,TABLE.hdft TD.tl {background:#6699CC;color:white;} TABLE.hdft TD.nv {background:#6633DD;color:white;} .nv A:link {color:white;} .nv A:visited {color:white;} .nv A:active {color:yellow;} TABLE.hdft A:link {color:white;} TABLE.hdft A:visited {color:white;} TABLE.hdft A:active {color:yellow;} .in {color:#356085;} TABLE.s TD {padding-left:0.25em;padding-right:0.25em;} TABLE.s TD.l {padding-left:0.25em;padding-right:0.25em;text-align:right;background:#F0F0F0;} TABLE.s TR.z TD {background:#FF9999;} TABLE.s TR.p TD {background:#FFFF88;} TABLE.s TR.c TD {background:#CCFFCC;} A:link {color:#0000EE;text-decoration:none;} A:visited {color:#0000EE;text-decoration:none;} A:hover {color:#0000EE;text-decoration:underline;} TABLE.cn {border-width:0 0 1px 0;} TABLE.s {border-width:1px 0 1px 1px;} TD.h {color:red;border-width:0 1px 0 0;} TD.f {border-width:0 1px 0 1px;} TD.hf {color:red;border-width:0 1px 0 1px;} TH.f {border-width:1px 1px 1px 1px;} TR.cis TD {background:#F0F0F0;} TR.cis TD {border-width:1px 1px 1px 0;} TR.cis TD.h {color:red;border-width:1px 1px 1px 0;} TR.cis TD.f {border-width:1px 1px 1px 1px;} TR.cis TD.hf {color:red;border-width:1px 1px 1px 1px;} TD.b {border-style:none;background:transparent;line-height:50%;}  TD.bt {border-width:1px 0 0 0;background:transparent;line-height:50%;} TR.o TD {background:#F0F0F0;}TABLE.it {border-style:none;}TABLE.it TD,TABLE.it TH {border-style:none;}</STYLE></HEAD><BODY><TABLE CLASS="hdft" CELLSPACING="0" WIDTH="100%"><TR><TH CLASS="tl"><A HREF="http://www.eclemma.org/">EMMA</A> Coverage Report (generated Thu Dec 17 17:04:35 EST 2009)</TH></TR><TR><TD CLASS="nv">[<A HREF="../Framework-12-17.html">all classes</A>][<A HREF="20.html">ks.client.gamefactory</A>]</TD></TR></TABLE><H2>COVERAGE SUMMARY FOR SOURCE FILE [<SPAN CLASS="in">GameWindow.java</SPAN>]</H2><TABLE CELLSPACING="0" WIDTH="100%"><TR><TH>name</TH><TH>class, %</TH><TH>method, %</TH><TH>block, %</TH><TH>line, %</TH></TR><TR><TD>GameWindow.java</TD><TD>100% (3/3)</TD><TD CLASS="h">36%  (21/58)</TD><TD CLASS="h">46%  (366/790)</TD><TD CLASS="h">42%  (87.6/208)</TD></TR></TABLE><H3>COVERAGE BREAKDOWN BY CLASS AND METHOD</H3><TABLE CLASS="cn" CELLSPACING="0" WIDTH="100%"><TR><TH CLASS="f">name</TH><TH>class, %</TH><TH>method, %</TH><TH>block, %</TH><TH>line, %</TH></TR><TR><TD CLASS="b"> </TD><TD CLASS="b"> </TD><TD CLASS="b"> </TD><TD CLASS="b"> </TD><TD CLASS="b"> </TD></TR><TR CLASS="cis"><TD CLASS="f">class <A HREF="#0">GameWindow$IvjEventHandler</A></TD><TD>100% (1/1)</TD><TD CLASS="h">40%  (8/20)</TD><TD CLASS="h">22%  (17/79)</TD><TD CLASS="h">29%  (9/31)</TD></TR><TR><TD CLASS="f"><A HREF="#1">actionPerformed (ActionEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#2">mouseClicked (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/11)</TD><TD CLASS="h">0%   (0/3)</TD></TR><TR><TD CLASS="f"><A HREF="#3">mouseDragged (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/11)</TD><TD CLASS="h">0%   (0/3)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#4">mouseEntered (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="f"><A HREF="#5">mouseExited (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#6">mouseMoved (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/11)</TD><TD CLASS="h">0%   (0/3)</TD></TR><TR><TD CLASS="f"><A HREF="#7">mousePressed (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/11)</TD><TD CLASS="h">0%   (0/3)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#8">mouseReleased (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/11)</TD><TD CLASS="h">0%   (0/3)</TD></TR><TR><TD CLASS="f"><A HREF="#9">windowClosed (WindowEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#a">windowClosing (WindowEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="f"><A HREF="#b">windowDeiconified (WindowEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#c">windowIconified (WindowEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="f"><A HREF="#0">GameWindow$IvjEventHandler (GameWindow): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>100% (6/6)</TD><TD>100% (1/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#e">componentHidden (ComponentEvent): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>100% (1/1)</TD><TD>100% (1/1)</TD></TR><TR><TD CLASS="f"><A HREF="#f">componentMoved (ComponentEvent): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>100% (1/1)</TD><TD>100% (1/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#10">componentResized (ComponentEvent): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>100% (5/5)</TD><TD>100% (2/2)</TD></TR><TR><TD CLASS="f"><A HREF="#11">componentShown (ComponentEvent): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>100% (1/1)</TD><TD>100% (1/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#12">windowActivated (WindowEvent): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>100% (1/1)</TD><TD>100% (1/1)</TD></TR><TR><TD CLASS="f"><A HREF="#13">windowDeactivated (WindowEvent): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>100% (1/1)</TD><TD>100% (1/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#14">windowOpened (WindowEvent): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>100% (1/1)</TD><TD>100% (1/1)</TD></TR><TR><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD></TR><TR CLASS="cis"><TD CLASS="f">class <A HREF="#15">GameWindow$1</A></TD><TD>100% (1/1)</TD><TD CLASS="h">50%  (1/2)</TD><TD CLASS="h">46%  (6/13)</TD><TD CLASS="h">40%  (2/5)</TD></TR><TR><TD CLASS="f"><A HREF="#16">actionPerformed (ActionEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/7)</TD><TD CLASS="h">0%   (0/3)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#15">GameWindow$1 (GameWindow): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>100% (6/6)</TD><TD>100% (2/2)</TD></TR><TR><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD></TR><TR CLASS="cis"><TD CLASS="f">class <A HREF="#18">GameWindow</A></TD><TD>100% (1/1)</TD><TD CLASS="h">33%  (12/36)</TD><TD CLASS="h">49%  (343/698)</TD><TD CLASS="h">45%  (77.6/173)</TD></TR><TR><TD CLASS="f"><A HREF="#19">GameWindow (String): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/43)</TD><TD CLASS="h">0%   (0/13)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#1a">access$0 (GameWindow): Container</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/3)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="f"><A HREF="#1b">access$1 (GameWindow, MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/4)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#1c">access$2 (GameWindow, MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/4)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="f"><A HREF="#1d">access$3 (GameWindow, MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/4)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#1e">access$4 (GameWindow, MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/4)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="f"><A HREF="#1f">access$5 (GameWindow, MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/4)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#20">connEtoC2 (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/9)</TD><TD CLASS="h">0%   (0/4)</TD></TR><TR><TD CLASS="f"><A HREF="#21">connEtoC3 (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/9)</TD><TD CLASS="h">0%   (0/4)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#22">connEtoC4 (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/9)</TD><TD CLASS="h">0%   (0/4)</TD></TR><TR><TD CLASS="f"><A HREF="#23">connEtoC5 (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/9)</TD><TD CLASS="h">0%   (0/4)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#24">connEtoC6 (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/9)</TD><TD CLASS="h">0%   (0/4)</TD></TR><TR><TD CLASS="f"><A HREF="#25">container_MouseClicked (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/5)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#26">container_MouseDragged (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/5)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR><TD CLASS="f"><A HREF="#27">container_MouseMoved (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/5)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#28">container_MousePressed (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/5)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR><TD CLASS="f"><A HREF="#29">container_MouseReleased (MouseEvent): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/5)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#2a">createBackgroundImage (URL): Image</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/29)</TD><TD CLASS="h">0%   (0/7)</TD></TR><TR><TD CLASS="f"><A HREF="#2b">gameWindow_WindowEvents (): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/13)</TD><TD CLASS="h">0%   (0/4)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#2c">handleException (Throwable): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/4)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR><TD CLASS="f"><A HREF="#2d">incrementNumNewHands (): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/4)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#2e">incrementNumWins (): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/4)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR><TD CLASS="f"><A HREF="#2f">setSkin (String): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/109)</TD><TD CLASS="h">0%   (0/22)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#30">updateScore (int): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/10)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR><TD CLASS="f"><A HREF="#31">gameWindow_ComponentResized (ComponentEvent): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD CLASS="h">32%  (11/34)</TD><TD CLASS="h">43%  (3/7)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#32">initialize (Solitaire): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>83%  (43/52)</TD><TD>92%  (11/12)</TD></TR><TR><TD CLASS="f"><A HREF="#33">initialize (): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>88%  (29/33)</TD><TD>80%  (8/10)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#34">getContainer (): Container</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>90%  (36/40)</TD><TD CLASS="h">78%  (7/9)</TD></TR><TR><TD CLASS="f"><A HREF="#35">offsetHeight (): int</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>90%  (18/20)</TD><TD>96%  (4.8/5)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#36">offsetWidth (): int</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>90%  (18/20)</TD><TD>96%  (4.8/5)</TD></TR><TR><TD CLASS="f"><A HREF="#37">getContentsPane (): Panel</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>97%  (37/38)</TD><TD>88%  (7/8)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#38">getControlPane (): Panel</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>98%  (40/41)</TD><TD>89%  (8/9)</TD></TR><TR><TD CLASS="f"><A HREF="#18">GameWindow (): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>100% (44/44)</TD><TD>100% (15/15)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#3a">getGameContainer (): Container</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>100% (3/3)</TD><TD>100% (1/1)</TD></TR><TR><TD CLASS="f"><A HREF="#3b">getnewGame (): Button</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>100% (40/40)</TD><TD>100% (8/8)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#3c">initConnections (): void</A></TD><TD> </TD><TD>100% (1/1)</TD><TD>100% (24/24)</TD><TD>100% (6/6)</TD></TR></TABLE><P></P><TABLE CLASS="s" CELLSPACING="0" WIDTH="100%"><TR CLASS="c"><TD CLASS="l"><A NAME="15">1</A></TD><TD>package ks.client.gamefactory;</TD></TR><TR><TD CLASS="l">2</TD><TD> </TD></TR><TR><TD CLASS="l">3</TD><TD>import ks.client.gamefactory.skin.*;</TD></TR><TR><TD CLASS="l">4</TD><TD>import ks.common.games.Solitaire;</TD></TR><TR><TD CLASS="l">5</TD><TD>import ks.common.games.SolitaireSolver;</TD></TR><TR><TD CLASS="l">6</TD><TD>import ks.common.view.BackgroundCopier;</TD></TR><TR><TD CLASS="l">7</TD><TD>import ks.common.view.Container;</TD></TR><TR><TD CLASS="l">8</TD><TD>import java.awt.Rectangle;</TD></TR><TR><TD CLASS="l">9</TD><TD>import java.awt.Button;</TD></TR><TR><TD CLASS="l">10</TD><TD> </TD></TR><TR><TD CLASS="l">11</TD><TD>/**</TD></TR><TR><TD CLASS="l">12</TD><TD> * Primary Window for managing the Container within which the solitaire</TD></TR><TR><TD CLASS="l">13</TD><TD> * action takes place.&lt;p&gt;</TD></TR><TR><TD CLASS="l">14</TD><TD> *</TD></TR><TR><TD CLASS="l">15</TD><TD> * GameWindow can speak back to the primary connection through </TD></TR><TR><TD CLASS="l">16</TD><TD> * its helperClient (which it shares with KombatClient).&lt;p&gt;</TD></TR><TR><TD CLASS="l">17</TD><TD> *</TD></TR><TR><TD CLASS="l">18</TD><TD> * GameWindow receives TimerExpired events from its &lt;code&gt;TimerPanel&lt;/code&gt; entity.</TD></TR><TR><TD CLASS="l">19</TD><TD> *</TD></TR><TR><TD CLASS="l">20</TD><TD> * Creation date: (9/25/01 9:19:21 PM)</TD></TR><TR><TD CLASS="l">21</TD><TD> * @author George T. Heineman (heineman@cs.wpi.edu)</TD></TR><TR><TD CLASS="l">22</TD><TD> */</TD></TR><TR><TD CLASS="l">23</TD><TD>public class GameWindow extends java.awt.Frame implements IUpdateStatus {</TD></TR><TR><TD CLASS="l">24</TD><TD>        /**</TD></TR><TR><TD CLASS="l">25</TD><TD>         * Comment for &lt;code&gt;serialVersionUID&lt;/code&gt;</TD></TR><TR><TD CLASS="l">26</TD><TD>         */</TD></TR><TR><TD CLASS="l">27</TD><TD>        private static final long serialVersionUID = 3544957666427353398L;</TD></TR><TR CLASS="p"><TD CLASS="l" TITLE="51% line coverage (44 out of 87 instructions)">28</TD><TD TITLE="51% line coverage (44 out of 87 instructions)">        private java.awt.Panel ivjContentsPane = null;</TD></TR><TR CLASS="p"><TD CLASS="l" TITLE="51% line coverage (44 out of 87 instructions)">29</TD><TD TITLE="51% line coverage (44 out of 87 instructions)">        private java.awt.Panel ivjTopPane = null;</TD></TR><TR CLASS="p"><TD CLASS="l" TITLE="51% line coverage (44 out of 87 instructions)">30</TD><TD TITLE="51% line coverage (44 out of 87 instructions)">        IvjEventHandler ivjEventHandler = new IvjEventHandler();</TD></TR><TR CLASS="p"><TD CLASS="l" TITLE="51% line coverage (44 out of 87 instructions)">31</TD><TD TITLE="51% line coverage (44 out of 87 instructions)">        private Container ivjContainer = null;</TD></TR><TR><TD CLASS="l">32</TD><TD>        </TD></TR><TR><TD CLASS="l">33</TD><TD>        /** Name of the current user. Needed to include this value within the Container. */</TD></TR><TR CLASS="p"><TD CLASS="l" TITLE="51% line coverage (44 out of 87 instructions)">34</TD><TD TITLE="51% line coverage (44 out of 87 instructions)">        protected String currentUser = &#34;test&#34;;</TD></TR><TR><TD CLASS="l">35</TD><TD>        </TD></TR><TR><TD CLASS="l">36</TD><TD>        /** Initial width for the window. Must never shrink less than this. */</TD></TR><TR CLASS="p"><TD CLASS="l" TITLE="51% line coverage (44 out of 87 instructions)">37</TD><TD TITLE="51% line coverage (44 out of 87 instructions)">        protected int initialWidth = 769;</TD></TR><TR><TD CLASS="l">38</TD><TD>        </TD></TR><TR><TD CLASS="l">39</TD><TD>        /** Initial height for the window. Must never shrink less than this. */</TD></TR><TR CLASS="p"><TD CLASS="l" TITLE="51% line coverage (44 out of 87 instructions)">40</TD><TD TITLE="51% line coverage (44 out of 87 instructions)">        protected int initialHeight = 635;</TD></TR><TR><TD CLASS="l">41</TD><TD>        </TD></TR><TR><TD CLASS="l">42</TD><TD>        /** Last height for the window. Start with initial height. */</TD></TR><TR CLASS="p"><TD CLASS="l" TITLE="51% line coverage (44 out of 87 instructions)">43</TD><TD TITLE="51% line coverage (44 out of 87 instructions)">        protected int lastHeight = 635;</TD></TR><TR><TD CLASS="l">44</TD><TD>        </TD></TR><TR><TD CLASS="l">45</TD><TD>        /** Last width for the window. Start with initial width. */</TD></TR><TR CLASS="p"><TD CLASS="l" TITLE="51% line coverage (44 out of 87 instructions)">46</TD><TD TITLE="51% line coverage (44 out of 87 instructions)">        protected int lastWidth = 769;</TD></TR><TR><TD CLASS="l">47</TD><TD>        </TD></TR><TR><TD CLASS="l">48</TD><TD>        /** Since V2.2: Must hold active game until timer expires. */</TD></TR><TR CLASS="p"><TD CLASS="l" TITLE="51% line coverage (44 out of 87 instructions)">49</TD><TD TITLE="51% line coverage (44 out of 87 instructions)">        Solitaire activeGame = null;  //  @jve:decl-index=0:</TD></TR><TR><TD CLASS="l">50</TD><TD>        </TD></TR><TR><TD CLASS="l"><A NAME="0">51</A></TD><TD>        /** Since V1.6.2: The solver. */</TD></TR><TR CLASS="p"><TD CLASS="l" TITLE="51% line coverage (44 out of 87 instructions)">52</TD><TD TITLE="51% line coverage (44 out of 87 instructions)">        protected SolitaireSolver ss = null;</TD></TR><TR CLASS="p"><TD CLASS="l" TITLE="51% line coverage (44 out of 87 instructions)">53</TD><TD TITLE="51% line coverage (44 out of 87 instructions)">        private Button ivjnewGame = null;</TD></TR><TR><TD CLASS="l"><A NAME="1">54</A></TD><TD>        </TD></TR><TR CLASS="c"><TD CLASS="l"><A NAME="e">55</A></TD><TD>        class IvjEventHandler implements java.awt.event.ActionListener, java.awt.event.ComponentListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.WindowListener {</TD></TR><TR><TD CLASS="l"><A NAME="f">56</A></TD><TD>                public void actionPerformed(java.awt.event.ActionEvent e) {</TD></TR><TR><TD CLASS="l">57</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="10">58</A></TD><TD>                };</TD></TR><TR CLASS="c"><TD CLASS="l">59</TD><TD>                public void componentHidden(java.awt.event.ComponentEvent e) {};</TD></TR><TR CLASS="c"><TD CLASS="l"><A NAME="11">60</A></TD><TD>                public void componentMoved(java.awt.event.ComponentEvent e) {};</TD></TR><TR><TD CLASS="l">61</TD><TD>                public void componentResized(java.awt.event.ComponentEvent e) {</TD></TR><TR CLASS="c"><TD CLASS="l"><A NAME="2">62</A></TD><TD>                        gameWindow_ComponentResized(e);</TD></TR><TR CLASS="c"><TD CLASS="l">63</TD><TD>                };</TD></TR><TR CLASS="c"><TD CLASS="l">64</TD><TD>                public void componentShown(java.awt.event.ComponentEvent e) {};</TD></TR><TR><TD CLASS="l">65</TD><TD>                public void mouseClicked(java.awt.event.MouseEvent e) {</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="3">66</A></TD><TD>                        if (e.getSource() == GameWindow.this.getContainer()) </TD></TR><TR CLASS="z"><TD CLASS="l">67</TD><TD>                                connEtoC2(e);</TD></TR><TR CLASS="z"><TD CLASS="l">68</TD><TD>                };</TD></TR><TR><TD CLASS="l"><A NAME="4">69</A></TD><TD>                public void mouseDragged(java.awt.event.MouseEvent e) {</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="5">70</A></TD><TD>                        if (e.getSource() == GameWindow.this.getContainer()) </TD></TR><TR CLASS="z"><TD CLASS="l">71</TD><TD>                                connEtoC3(e);</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="6">72</A></TD><TD>                };</TD></TR><TR CLASS="z"><TD CLASS="l">73</TD><TD>                public void mouseEntered(java.awt.event.MouseEvent e) {};</TD></TR><TR CLASS="z"><TD CLASS="l">74</TD><TD>                public void mouseExited(java.awt.event.MouseEvent e) {};</TD></TR><TR><TD CLASS="l">75</TD><TD>                public void mouseMoved(java.awt.event.MouseEvent e) {</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="7">76</A></TD><TD>                        if (e.getSource() == GameWindow.this.getContainer()) </TD></TR><TR CLASS="z"><TD CLASS="l">77</TD><TD>                                connEtoC4(e);</TD></TR><TR CLASS="z"><TD CLASS="l">78</TD><TD>                };</TD></TR><TR><TD CLASS="l">79</TD><TD>                public void mousePressed(java.awt.event.MouseEvent e) {</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="8">80</A></TD><TD>                        if (e.getSource() == GameWindow.this.getContainer()) </TD></TR><TR CLASS="z"><TD CLASS="l">81</TD><TD>                                connEtoC5(e);</TD></TR><TR CLASS="z"><TD CLASS="l">82</TD><TD>                };</TD></TR><TR><TD CLASS="l"><A NAME="12">83</A></TD><TD>                public void mouseReleased(java.awt.event.MouseEvent e) {</TD></TR><TR CLASS="z"><TD CLASS="l">84</TD><TD>                        if (e.getSource() == GameWindow.this.getContainer()) </TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="9">85</A></TD><TD>                                connEtoC6(e);</TD></TR><TR CLASS="z"><TD CLASS="l">86</TD><TD>                };</TD></TR><TR CLASS="c"><TD CLASS="l">87</TD><TD>                public void windowActivated(java.awt.event.WindowEvent e) {};</TD></TR><TR><TD CLASS="l"><A NAME="a">88</A></TD><TD>                public void windowClosed(java.awt.event.WindowEvent e) {</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="13">89</A></TD><TD>                };</TD></TR><TR><TD CLASS="l"><A NAME="b">90</A></TD><TD>                public void windowClosing(java.awt.event.WindowEvent e) {</TD></TR><TR><TD CLASS="l"><A NAME="c">91</A></TD><TD>                        </TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="14">92</A></TD><TD>                };</TD></TR><TR CLASS="c"><TD CLASS="l">93</TD><TD>                public void windowDeactivated(java.awt.event.WindowEvent e) {};</TD></TR><TR CLASS="z"><TD CLASS="l">94</TD><TD>                public void windowDeiconified(java.awt.event.WindowEvent e) {};</TD></TR><TR CLASS="z"><TD CLASS="l">95</TD><TD>                public void windowIconified(java.awt.event.WindowEvent e) {};</TD></TR><TR CLASS="c"><TD CLASS="l">96</TD><TD>                public void windowOpened(java.awt.event.WindowEvent e) {};</TD></TR><TR><TD CLASS="l">97</TD><TD>        };</TD></TR><TR><TD CLASS="l"><A NAME="18">98</A></TD><TD>/**</TD></TR><TR><TD CLASS="l">99</TD><TD> * GameWindow constructor comment.</TD></TR><TR><TD CLASS="l">100</TD><TD> */</TD></TR><TR><TD CLASS="l">101</TD><TD>public GameWindow() {</TD></TR><TR CLASS="c"><TD CLASS="l">102</TD><TD>        super();</TD></TR><TR CLASS="c"><TD CLASS="l">103</TD><TD>        initialize();</TD></TR><TR CLASS="c"><TD CLASS="l">104</TD><TD>}</TD></TR><TR><TD CLASS="l">105</TD><TD>/**</TD></TR><TR><TD CLASS="l"><A NAME="19">106</A></TD><TD> * GameWindow constructor comment.</TD></TR><TR><TD CLASS="l">107</TD><TD> * @param title java.lang.String</TD></TR><TR><TD CLASS="l">108</TD><TD> */</TD></TR><TR><TD CLASS="l">109</TD><TD>public GameWindow(String title) {</TD></TR><TR CLASS="z"><TD CLASS="l">110</TD><TD>        super(title);</TD></TR><TR><TD CLASS="l">111</TD><TD>}</TD></TR><TR><TD CLASS="l">112</TD><TD> </TD></TR><TR><TD CLASS="l">113</TD><TD> </TD></TR><TR><TD CLASS="l">114</TD><TD> </TD></TR><TR><TD CLASS="l">115</TD><TD> </TD></TR><TR><TD CLASS="l">116</TD><TD>/**</TD></TR><TR><TD CLASS="l"><A NAME="1b">117</A></TD><TD> * connEtoC2:  (Container.mouse.mouseClicked(java.awt.event.MouseEvent) --&gt; GameWindow.container_MouseClicked(Ljava.awt.event.MouseEvent;)V)</TD></TR><TR><TD CLASS="l">118</TD><TD> * @param arg1 java.awt.event.MouseEvent</TD></TR><TR><TD CLASS="l">119</TD><TD> */</TD></TR><TR><TD CLASS="l">120</TD><TD>/* WARNING: THIS METHOD WILL BE REGENERATED. */</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="20">121</A></TD><TD>private void connEtoC2(java.awt.event.MouseEvent arg1) {</TD></TR><TR><TD CLASS="l">122</TD><TD>        try {</TD></TR><TR><TD CLASS="l">123</TD><TD>                // user code begin {1}</TD></TR><TR><TD CLASS="l">124</TD><TD>                // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">125</TD><TD>                this.container_MouseClicked(arg1);</TD></TR><TR><TD CLASS="l">126</TD><TD>                // user code begin {2}</TD></TR><TR><TD CLASS="l">127</TD><TD>                // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">128</TD><TD>        } catch (java.lang.Throwable ivjExc) {</TD></TR><TR><TD CLASS="l">129</TD><TD>                // user code begin {3}</TD></TR><TR><TD CLASS="l">130</TD><TD>                // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">131</TD><TD>                handleException(ivjExc);</TD></TR><TR><TD CLASS="l">132</TD><TD>        }</TD></TR><TR CLASS="z"><TD CLASS="l">133</TD><TD>}</TD></TR><TR><TD CLASS="l">134</TD><TD>/**</TD></TR><TR><TD CLASS="l"><A NAME="1c">135</A></TD><TD> * connEtoC3:  (Container.mouseMotion.mouseDragged(java.awt.event.MouseEvent) --&gt; GameWindow.container_MouseDragged(Ljava.awt.event.MouseEvent;)V)</TD></TR><TR><TD CLASS="l">136</TD><TD> * @param arg1 java.awt.event.MouseEvent</TD></TR><TR><TD CLASS="l">137</TD><TD> */</TD></TR><TR><TD CLASS="l">138</TD><TD>/* WARNING: THIS METHOD WILL BE REGENERATED. */</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="21">139</A></TD><TD>private void connEtoC3(java.awt.event.MouseEvent arg1) {</TD></TR><TR><TD CLASS="l">140</TD><TD>        try {</TD></TR><TR><TD CLASS="l">141</TD><TD>                // user code begin {1}</TD></TR><TR><TD CLASS="l">142</TD><TD>                // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">143</TD><TD>                this.container_MouseDragged(arg1);</TD></TR><TR><TD CLASS="l">144</TD><TD>                // user code begin {2}</TD></TR><TR><TD CLASS="l">145</TD><TD>                // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">146</TD><TD>        } catch (java.lang.Throwable ivjExc) {</TD></TR><TR><TD CLASS="l">147</TD><TD>                // user code begin {3}</TD></TR><TR><TD CLASS="l">148</TD><TD>                // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">149</TD><TD>                handleException(ivjExc);</TD></TR><TR><TD CLASS="l">150</TD><TD>        }</TD></TR><TR CLASS="z"><TD CLASS="l">151</TD><TD>}</TD></TR><TR><TD CLASS="l">152</TD><TD>/**</TD></TR><TR><TD CLASS="l"><A NAME="1d">153</A></TD><TD> * connEtoC4:  (Container.mouseMotion.mouseMoved(java.awt.event.MouseEvent) --&gt; GameWindow.container_MouseMoved(Ljava.awt.event.MouseEvent;)V)</TD></TR><TR><TD CLASS="l">154</TD><TD> * @param arg1 java.awt.event.MouseEvent</TD></TR><TR><TD CLASS="l">155</TD><TD> */</TD></TR><TR><TD CLASS="l">156</TD><TD>/* WARNING: THIS METHOD WILL BE REGENERATED. */</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="22">157</A></TD><TD>private void connEtoC4(java.awt.event.MouseEvent arg1) {</TD></TR><TR><TD CLASS="l">158</TD><TD>        try {</TD></TR><TR><TD CLASS="l">159</TD><TD>                // user code begin {1}</TD></TR><TR><TD CLASS="l">160</TD><TD>                // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">161</TD><TD>                this.container_MouseMoved(arg1);</TD></TR><TR><TD CLASS="l">162</TD><TD>                // user code begin {2}</TD></TR><TR><TD CLASS="l">163</TD><TD>                // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">164</TD><TD>        } catch (java.lang.Throwable ivjExc) {</TD></TR><TR><TD CLASS="l">165</TD><TD>                // user code begin {3}</TD></TR><TR><TD CLASS="l">166</TD><TD>                // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">167</TD><TD>                handleException(ivjExc);</TD></TR><TR><TD CLASS="l">168</TD><TD>        }</TD></TR><TR CLASS="z"><TD CLASS="l">169</TD><TD>}</TD></TR><TR><TD CLASS="l">170</TD><TD>/**</TD></TR><TR><TD CLASS="l"><A NAME="1e">171</A></TD><TD> * connEtoC5:  (Container.mouse.mousePressed(java.awt.event.MouseEvent) --&gt; GameWindow.container_MousePressed(Ljava.awt.event.MouseEvent;)V)</TD></TR><TR><TD CLASS="l">172</TD><TD> * @param arg1 java.awt.event.MouseEvent</TD></TR><TR><TD CLASS="l">173</TD><TD> */</TD></TR><TR><TD CLASS="l">174</TD><TD>/* WARNING: THIS METHOD WILL BE REGENERATED. */</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="23">175</A></TD><TD>private void connEtoC5(java.awt.event.MouseEvent arg1) {</TD></TR><TR><TD CLASS="l">176</TD><TD>        try {</TD></TR><TR><TD CLASS="l">177</TD><TD>                // user code begin {1}</TD></TR><TR><TD CLASS="l">178</TD><TD>                // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">179</TD><TD>                this.container_MousePressed(arg1);</TD></TR><TR><TD CLASS="l">180</TD><TD>                // user code begin {2}</TD></TR><TR><TD CLASS="l">181</TD><TD>                // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">182</TD><TD>        } catch (java.lang.Throwable ivjExc) {</TD></TR><TR><TD CLASS="l">183</TD><TD>                // user code begin {3}</TD></TR><TR><TD CLASS="l">184</TD><TD>                // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">185</TD><TD>                handleException(ivjExc);</TD></TR><TR><TD CLASS="l">186</TD><TD>        }</TD></TR><TR CLASS="z"><TD CLASS="l">187</TD><TD>}</TD></TR><TR><TD CLASS="l">188</TD><TD>/**</TD></TR><TR><TD CLASS="l"><A NAME="1f">189</A></TD><TD> * connEtoC6:  (Container.mouse.mouseReleased(java.awt.event.MouseEvent) --&gt; GameWindow.container_MouseReleased(Ljava.awt.event.MouseEvent;)V)</TD></TR><TR><TD CLASS="l">190</TD><TD> * @param arg1 java.awt.event.MouseEvent</TD></TR><TR><TD CLASS="l">191</TD><TD> */</TD></TR><TR><TD CLASS="l">192</TD><TD>/* WARNING: THIS METHOD WILL BE REGENERATED. */</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="24">193</A></TD><TD>private void connEtoC6(java.awt.event.MouseEvent arg1) {</TD></TR><TR><TD CLASS="l">194</TD><TD>        try {</TD></TR><TR><TD CLASS="l">195</TD><TD>                // user code begin {1}</TD></TR><TR><TD CLASS="l">196</TD><TD>                // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">197</TD><TD>                this.container_MouseReleased(arg1);</TD></TR><TR><TD CLASS="l">198</TD><TD>                // user code begin {2}</TD></TR><TR><TD CLASS="l">199</TD><TD>                // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">200</TD><TD>        } catch (java.lang.Throwable ivjExc) {</TD></TR><TR><TD CLASS="l">201</TD><TD>                // user code begin {3}</TD></TR><TR><TD CLASS="l">202</TD><TD>                // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">203</TD><TD>                handleException(ivjExc);</TD></TR><TR><TD CLASS="l">204</TD><TD>        }</TD></TR><TR CLASS="z"><TD CLASS="l">205</TD><TD>}</TD></TR><TR><TD CLASS="l">206</TD><TD> </TD></TR><TR><TD CLASS="l">207</TD><TD>/**</TD></TR><TR><TD CLASS="l"><A NAME="25">208</A></TD><TD> * Route the event into the container handler routines</TD></TR><TR><TD CLASS="l">209</TD><TD> */</TD></TR><TR><TD CLASS="l">210</TD><TD>public void container_MouseClicked(java.awt.event.MouseEvent mouseEvent) {</TD></TR><TR><TD CLASS="l">211</TD><TD>        // these don't seem to be invoked at all?        </TD></TR><TR CLASS="z"><TD CLASS="l">212</TD><TD>        getContainer().processMouseEvent(mouseEvent);</TD></TR><TR CLASS="z"><TD CLASS="l">213</TD><TD>}</TD></TR><TR><TD CLASS="l">214</TD><TD>/**</TD></TR><TR><TD CLASS="l"><A NAME="26">215</A></TD><TD> * Route the event into the container handler routines</TD></TR><TR><TD CLASS="l">216</TD><TD> */</TD></TR><TR><TD CLASS="l">217</TD><TD>public void container_MouseDragged(java.awt.event.MouseEvent mouseEvent) {</TD></TR><TR><TD CLASS="l">218</TD><TD>        // Invoked but not terribly useful!</TD></TR><TR CLASS="z"><TD CLASS="l">219</TD><TD>        getContainer().processMouseEvent(mouseEvent);</TD></TR><TR CLASS="z"><TD CLASS="l">220</TD><TD>}</TD></TR><TR><TD CLASS="l">221</TD><TD>/**</TD></TR><TR><TD CLASS="l"><A NAME="27">222</A></TD><TD> * Route the event into the container handler routines</TD></TR><TR><TD CLASS="l">223</TD><TD> */</TD></TR><TR><TD CLASS="l">224</TD><TD>public void container_MouseMoved(java.awt.event.MouseEvent mouseEvent) {</TD></TR><TR><TD CLASS="l">225</TD><TD>        // Invoked but not terribly useful!        </TD></TR><TR CLASS="z"><TD CLASS="l">226</TD><TD>        getContainer().processMouseEvent(mouseEvent);</TD></TR><TR CLASS="z"><TD CLASS="l">227</TD><TD>}</TD></TR><TR><TD CLASS="l">228</TD><TD>/**</TD></TR><TR><TD CLASS="l"><A NAME="28">229</A></TD><TD> * Route the event into the container handler routines</TD></TR><TR><TD CLASS="l">230</TD><TD> */</TD></TR><TR><TD CLASS="l">231</TD><TD>public void container_MousePressed(java.awt.event.MouseEvent mouseEvent) {</TD></TR><TR><TD CLASS="l">232</TD><TD>        // these don't seem to be invoked at all?        </TD></TR><TR CLASS="z"><TD CLASS="l">233</TD><TD>        getContainer().processMouseEvent(mouseEvent);</TD></TR><TR CLASS="z"><TD CLASS="l">234</TD><TD>}</TD></TR><TR><TD CLASS="l">235</TD><TD>/**</TD></TR><TR><TD CLASS="l"><A NAME="29">236</A></TD><TD> * Route the event into the container handler routines</TD></TR><TR><TD CLASS="l">237</TD><TD> */</TD></TR><TR><TD CLASS="l">238</TD><TD>public void container_MouseReleased(java.awt.event.MouseEvent mouseEvent) {</TD></TR><TR><TD CLASS="l">239</TD><TD>        // these don't seem to be invoked at all?</TD></TR><TR CLASS="z"><TD CLASS="l">240</TD><TD>        getContainer().processMouseEvent(mouseEvent);</TD></TR><TR CLASS="z"><TD CLASS="l">241</TD><TD>}</TD></TR><TR><TD CLASS="l">242</TD><TD>/**</TD></TR><TR><TD CLASS="l">243</TD><TD> * Construct an image given the specified URL</TD></TR><TR><TD CLASS="l">244</TD><TD> * Creation date: (10/9/01 8:26:51 PM)</TD></TR><TR><TD CLASS="l"><A NAME="2a">245</A></TD><TD> * @return java.awt.Image</TD></TR><TR><TD CLASS="l">246</TD><TD> * @param u java.net.URL</TD></TR><TR><TD CLASS="l">247</TD><TD> */</TD></TR><TR><TD CLASS="l">248</TD><TD>protected java.awt.Image createBackgroundImage(java.net.URL u) {</TD></TR><TR CLASS="z"><TD CLASS="l">249</TD><TD>        java.awt.Image img = java.awt.Toolkit.getDefaultToolkit().getImage(u);</TD></TR><TR CLASS="z"><TD CLASS="l">250</TD><TD>        java.awt.MediaTracker tracker = new java.awt.MediaTracker (this);</TD></TR><TR CLASS="z"><TD CLASS="l">251</TD><TD>        tracker.addImage(img, 0);</TD></TR><TR><TD CLASS="l">252</TD><TD> </TD></TR><TR><TD CLASS="l">253</TD><TD> </TD></TR><TR><TD CLASS="l">254</TD><TD>        try {</TD></TR><TR CLASS="z"><TD CLASS="l">255</TD><TD>                tracker.waitForAll();</TD></TR><TR CLASS="z"><TD CLASS="l">256</TD><TD>        } catch (InterruptedException ie) {</TD></TR><TR><TD CLASS="l">257</TD><TD>                // we have been interrupted, but this is not overly problematic.</TD></TR><TR><TD CLASS="l">258</TD><TD>                // we will be slowed down on demand.</TD></TR><TR CLASS="z"><TD CLASS="l">259</TD><TD>                System.err.println (&#34;GameWindow::createBackgroundImage() interrupted:&#34; + ie.toString());</TD></TR><TR><TD CLASS="l">260</TD><TD>        }</TD></TR><TR><TD CLASS="l">261</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">262</TD><TD>        return img;</TD></TR><TR><TD CLASS="l">263</TD><TD>}</TD></TR><TR><TD CLASS="l">264</TD><TD>/**</TD></TR><TR><TD CLASS="l">265</TD><TD> * Handle the window resize events here.  Resize Container and move control panel</TD></TR><TR><TD CLASS="l">266</TD><TD> * down a few pixels to make space.</TD></TR><TR><TD CLASS="l"><A NAME="31">267</A></TD><TD> * @since V1.6.6</TD></TR><TR><TD CLASS="l">268</TD><TD> */</TD></TR><TR><TD CLASS="l">269</TD><TD>public void gameWindow_ComponentResized(java.awt.event.ComponentEvent componentEvent) {</TD></TR><TR><TD CLASS="l">270</TD><TD>        // calculate variance and return if no change.</TD></TR><TR CLASS="c"><TD CLASS="l">271</TD><TD>        int deltaY = offsetHeight();</TD></TR><TR CLASS="c"><TD CLASS="l">272</TD><TD>        int deltaX = offsetWidth();</TD></TR><TR CLASS="c"><TD CLASS="l">273</TD><TD>        if ((deltaX == 0) &amp;&amp; (deltaY == 0)) return;</TD></TR><TR><TD CLASS="l">274</TD><TD> </TD></TR><TR><TD CLASS="l">275</TD><TD>        // Push all gui elements at the bottom to be flush against the bottom edge</TD></TR><TR><TD CLASS="l">276</TD><TD>        // and extend the container dimension out to the right. Simply done because we</TD></TR><TR><TD CLASS="l">277</TD><TD>        // move the whole contentsPane</TD></TR><TR><TD CLASS="l">278</TD><TD>        java.awt.Rectangle r; </TD></TR><TR><TD CLASS="l">279</TD><TD>        </TD></TR><TR><TD CLASS="l">280</TD><TD>        // extend Container as much as we dare</TD></TR><TR CLASS="z"><TD CLASS="l">281</TD><TD>        r = getContainer().getBounds();</TD></TR><TR CLASS="z"><TD CLASS="l">282</TD><TD>        getContainer().setBounds (r.x, r.y, r.width + deltaX, r.height + deltaY);</TD></TR><TR><TD CLASS="l">283</TD><TD> </TD></TR><TR><TD CLASS="l">284</TD><TD>        // If resized, we must manually recalculate background so the refresh</TD></TR><TR><TD CLASS="l">285</TD><TD>        // routines will properly be able to address newly acquired real estate.</TD></TR><TR CLASS="z"><TD CLASS="l">286</TD><TD>        getContainer().recalculateBackground();</TD></TR><TR CLASS="z"><TD CLASS="l">287</TD><TD>}</TD></TR><TR><TD CLASS="l"><A NAME="2b">288</A></TD><TD>/**</TD></TR><TR><TD CLASS="l">289</TD><TD> * Comment</TD></TR><TR><TD CLASS="l">290</TD><TD> */</TD></TR><TR><TD CLASS="l">291</TD><TD>public void gameWindow_WindowEvents() {</TD></TR><TR CLASS="z"><TD CLASS="l">292</TD><TD>        int x = 5;</TD></TR><TR CLASS="z"><TD CLASS="l">293</TD><TD>        x = x+ 20;</TD></TR><TR CLASS="z"><TD CLASS="l">294</TD><TD>        System.err.println (&#34;x:&#34; + x);</TD></TR><TR CLASS="z"><TD CLASS="l">295</TD><TD>}</TD></TR><TR><TD CLASS="l">296</TD><TD>/**</TD></TR><TR><TD CLASS="l"><A NAME="1a">297</A></TD><TD> * Return the Panel2 property value.</TD></TR><TR><TD CLASS="l"><A NAME="34">298</A></TD><TD> * @return ks.common.view.Container</TD></TR><TR><TD CLASS="l">299</TD><TD> */</TD></TR><TR><TD CLASS="l">300</TD><TD>/* WARNING: THIS METHOD WILL BE REGENERATED. */</TD></TR><TR CLASS="z"><TD CLASS="l">301</TD><TD>private Container getContainer() {</TD></TR><TR CLASS="c"><TD CLASS="l">302</TD><TD>        if (ivjContainer == null) {</TD></TR><TR><TD CLASS="l">303</TD><TD>                try {</TD></TR><TR CLASS="c"><TD CLASS="l">304</TD><TD>                        ivjContainer = new Container();</TD></TR><TR CLASS="c"><TD CLASS="l">305</TD><TD>                        ivjContainer.setUpdateStatus(this);</TD></TR><TR CLASS="c"><TD CLASS="l">306</TD><TD>                        ivjContainer.setName(&#34;Container&#34;);</TD></TR><TR CLASS="c"><TD CLASS="l">307</TD><TD>                        ivjContainer.setBackground(new java.awt.Color(0,138,0));</TD></TR><TR CLASS="c"><TD CLASS="l">308</TD><TD>                        ivjContainer.setBounds(0, 0, 764, 512);  // was 14,52</TD></TR><TR><TD CLASS="l">309</TD><TD>                        // user code begin {1}</TD></TR><TR><TD CLASS="l">310</TD><TD>                        // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">311</TD><TD>                } catch (java.lang.Throwable ivjExc) {</TD></TR><TR><TD CLASS="l">312</TD><TD>                        // user code begin {2}</TD></TR><TR><TD CLASS="l">313</TD><TD>                        // user code end</TD></TR><TR CLASS="z"><TD CLASS="l">314</TD><TD>                        handleException(ivjExc);</TD></TR><TR><TD CLASS="l">315</TD><TD>                }</TD></TR><TR><TD CLASS="l">316</TD><TD>        }</TD></TR><TR CLASS="c"><TD CLASS="l"><A NAME="38">317</A></TD><TD>        return ivjContainer;</TD></TR><TR><TD CLASS="l">318</TD><TD>}</TD></TR><TR><TD CLASS="l">319</TD><TD>/* WARNING: THIS METHOD WILL BE REGENERATED. */</TD></TR><TR><TD CLASS="l">320</TD><TD>private java.awt.Panel getControlPane() {</TD></TR><TR CLASS="c"><TD CLASS="l">321</TD><TD>        if (ivjTopPane == null) {</TD></TR><TR><TD CLASS="l">322</TD><TD>                try {</TD></TR><TR CLASS="c"><TD CLASS="l">323</TD><TD>                        ivjTopPane = new java.awt.Panel();</TD></TR><TR CLASS="c"><TD CLASS="l">324</TD><TD>                        ivjTopPane.setName(&#34;TopPane&#34;);</TD></TR><TR CLASS="c"><TD CLASS="l">325</TD><TD>                        ivjTopPane.setSize(769, 40);</TD></TR><TR CLASS="c"><TD CLASS="l">326</TD><TD>                        ivjTopPane.setLayout(null);</TD></TR><TR CLASS="c"><TD CLASS="l">327</TD><TD>                        ivjTopPane.setBackground(new java.awt.Color(0,138,0));</TD></TR><TR CLASS="c"><TD CLASS="l">328</TD><TD>                        ivjTopPane.add(getnewGame(), null);</TD></TR><TR CLASS="z"><TD CLASS="l">329</TD><TD>                } catch (Exception e) {</TD></TR><TR><TD CLASS="l">330</TD><TD>                        </TD></TR><TR><TD CLASS="l">331</TD><TD>                }</TD></TR><TR><TD CLASS="l">332</TD><TD>        }</TD></TR><TR CLASS="c"><TD CLASS="l">333</TD><TD>        return ivjTopPane;</TD></TR><TR><TD CLASS="l">334</TD><TD>}</TD></TR><TR><TD CLASS="l">335</TD><TD>/**</TD></TR><TR><TD CLASS="l">336</TD><TD> * Return the ContentsPane property value.</TD></TR><TR><TD CLASS="l"><A NAME="37">337</A></TD><TD> * @return java.awt.Panel</TD></TR><TR><TD CLASS="l">338</TD><TD> */</TD></TR><TR><TD CLASS="l">339</TD><TD>/* WARNING: THIS METHOD WILL BE REGENERATED. */</TD></TR><TR><TD CLASS="l">340</TD><TD>private java.awt.Panel getContentsPane() {</TD></TR><TR CLASS="c"><TD CLASS="l">341</TD><TD>        if (ivjContentsPane == null) {</TD></TR><TR><TD CLASS="l">342</TD><TD>                try {</TD></TR><TR CLASS="c"><TD CLASS="l">343</TD><TD>                        ivjContentsPane = new java.awt.Panel();</TD></TR><TR CLASS="c"><TD CLASS="l">344</TD><TD>                        ivjContentsPane.setName(&#34;ContentsPane&#34;);</TD></TR><TR CLASS="c"><TD CLASS="l">345</TD><TD>                        ivjContentsPane.setLayout(null);</TD></TR><TR CLASS="c"><TD CLASS="l">346</TD><TD>                        ivjContentsPane.setBackground(new java.awt.Color(0,138,0));</TD></TR><TR CLASS="c"><TD CLASS="l">347</TD><TD>                        ivjContentsPane.add(getContainer(), getContainer().getName());</TD></TR><TR CLASS="z"><TD CLASS="l">348</TD><TD>                } catch (Exception e) {</TD></TR><TR><TD CLASS="l">349</TD><TD>                        </TD></TR><TR><TD CLASS="l">350</TD><TD>                }</TD></TR><TR><TD CLASS="l">351</TD><TD>        }</TD></TR><TR CLASS="c"><TD CLASS="l">352</TD><TD>        return ivjContentsPane;</TD></TR><TR><TD CLASS="l">353</TD><TD>}</TD></TR><TR><TD CLASS="l">354</TD><TD>/**</TD></TR><TR><TD CLASS="l">355</TD><TD> * Returns the Container in which solitaire games are being executed.</TD></TR><TR><TD CLASS="l"><A NAME="3a">356</A></TD><TD> * Creation date: (10/3/01 1:12:29 AM)</TD></TR><TR><TD CLASS="l">357</TD><TD> * @return ks.common.view.Container</TD></TR><TR><TD CLASS="l">358</TD><TD> */</TD></TR><TR><TD CLASS="l">359</TD><TD>public Container getGameContainer() {</TD></TR><TR CLASS="c"><TD CLASS="l">360</TD><TD>        return getContainer();</TD></TR><TR><TD CLASS="l">361</TD><TD>}</TD></TR><TR><TD CLASS="l">362</TD><TD> </TD></TR><TR><TD CLASS="l">363</TD><TD> </TD></TR><TR><TD CLASS="l">364</TD><TD>/**</TD></TR><TR><TD CLASS="l">365</TD><TD> * Called whenever the part throws an exception.</TD></TR><TR><TD CLASS="l">366</TD><TD> * @param exception java.lang.Throwable</TD></TR><TR><TD CLASS="l">367</TD><TD> */</TD></TR><TR><TD CLASS="l"><A NAME="2c">368</A></TD><TD>private void handleException(java.lang.Throwable exception) {</TD></TR><TR><TD CLASS="l">369</TD><TD> </TD></TR><TR><TD CLASS="l">370</TD><TD>        /* Uncomment the following lines to print uncaught exceptions to stdout */</TD></TR><TR><TD CLASS="l">371</TD><TD>        // System.out.println(&#34;--------- UNCAUGHT EXCEPTION ---------&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">372</TD><TD>        exception.printStackTrace(System.out);</TD></TR><TR CLASS="z"><TD CLASS="l">373</TD><TD>}</TD></TR><TR><TD CLASS="l">374</TD><TD>/**</TD></TR><TR><TD CLASS="l">375</TD><TD> * Initializes connections</TD></TR><TR><TD CLASS="l">376</TD><TD> * @exception java.lang.Exception The exception description.</TD></TR><TR><TD CLASS="l">377</TD><TD> */</TD></TR><TR><TD CLASS="l"><A NAME="3c">378</A></TD><TD>/* WARNING: THIS METHOD WILL BE REGENERATED. */</TD></TR><TR><TD CLASS="l">379</TD><TD>private void initConnections() throws java.lang.Exception {</TD></TR><TR><TD CLASS="l">380</TD><TD>        // user code begin {1}</TD></TR><TR><TD CLASS="l">381</TD><TD>        // user code end</TD></TR><TR CLASS="c"><TD CLASS="l">382</TD><TD>        this.addWindowListener(ivjEventHandler);</TD></TR><TR CLASS="c"><TD CLASS="l">383</TD><TD>        getContainer().addMouseListener(ivjEventHandler);</TD></TR><TR CLASS="c"><TD CLASS="l">384</TD><TD>        getContainer().addMouseMotionListener(ivjEventHandler);</TD></TR><TR CLASS="c"><TD CLASS="l">385</TD><TD>        getnewGame().addActionListener(ivjEventHandler);</TD></TR><TR CLASS="c"><TD CLASS="l">386</TD><TD>        this.addComponentListener(ivjEventHandler);</TD></TR><TR CLASS="c"><TD CLASS="l">387</TD><TD>}</TD></TR><TR><TD CLASS="l">388</TD><TD>/**</TD></TR><TR><TD CLASS="l">389</TD><TD> * Initialize the class.</TD></TR><TR><TD CLASS="l">390</TD><TD> */</TD></TR><TR><TD CLASS="l">391</TD><TD>/* WARNING: THIS METHOD WILL BE REGENERATED. */</TD></TR><TR><TD CLASS="l">392</TD><TD>private void initialize() {</TD></TR><TR><TD CLASS="l">393</TD><TD>        // GameWindow setup intends to prevent BAD security things:</TD></TR><TR><TD CLASS="l">394</TD><TD>        </TD></TR><TR><TD CLASS="l"><A NAME="33">395</A></TD><TD>        </TD></TR><TR><TD CLASS="l">396</TD><TD>        try {</TD></TR><TR><TD CLASS="l">397</TD><TD>                // user code begin {1}</TD></TR><TR><TD CLASS="l">398</TD><TD>                // user code end</TD></TR><TR CLASS="c"><TD CLASS="l">399</TD><TD>                setName(&#34;GameWindow&#34;);</TD></TR><TR CLASS="c"><TD CLASS="l">400</TD><TD>                setLayout(new java.awt.BorderLayout());</TD></TR><TR CLASS="c"><TD CLASS="l">401</TD><TD>                setSize(769, 635);</TD></TR><TR CLASS="c"><TD CLASS="l">402</TD><TD>                setTitle(&#34;Sample Game&#34;);</TD></TR><TR CLASS="c"><TD CLASS="l">403</TD><TD>                add(getControlPane(), &#34;North&#34;);</TD></TR><TR CLASS="c"><TD CLASS="l">404</TD><TD>                add(getContentsPane(), &#34;Center&#34;);</TD></TR><TR CLASS="c"><TD CLASS="l">405</TD><TD>                initConnections();</TD></TR><TR CLASS="z"><TD CLASS="l">406</TD><TD>        } catch (java.lang.Throwable ivjExc) {</TD></TR><TR CLASS="z"><TD CLASS="l">407</TD><TD>                handleException(ivjExc);</TD></TR><TR><TD CLASS="l">408</TD><TD>        }</TD></TR><TR><TD CLASS="l">409</TD><TD>        // user code begin {2}</TD></TR><TR><TD CLASS="l">410</TD><TD>        // user code end</TD></TR><TR CLASS="c"><TD CLASS="l">411</TD><TD>}</TD></TR><TR><TD CLASS="l">412</TD><TD>/**</TD></TR><TR><TD CLASS="l">413</TD><TD> * Initialize game canvas using specific solitaire game. </TD></TR><TR><TD CLASS="l">414</TD><TD> * </TD></TR><TR><TD CLASS="l">415</TD><TD> * Note that nothing will actually become visible until activate(boolean) is called.</TD></TR><TR><TD CLASS="l">416</TD><TD> * </TD></TR><TR><TD CLASS="l">417</TD><TD> * Called by the entity that creates the GameWindow. Must be called before setting GameWindow </TD></TR><TR><TD CLASS="l">418</TD><TD> * to Visible.</TD></TR><TR><TD CLASS="l">419</TD><TD> * &lt;p&gt;</TD></TR><TR><TD CLASS="l">420</TD><TD> * since v1.6.2 this enables a button &#34;Solve&#34; if the solitaire game is an</TD></TR><TR><TD CLASS="l">421</TD><TD> * instance of SolvableSolitaire.</TD></TR><TR><TD CLASS="l">422</TD><TD> * &lt;p&gt;</TD></TR><TR><TD CLASS="l">423</TD><TD> * Creation date: (10/1/01 9:10:22 PM)</TD></TR><TR><TD CLASS="l"><A NAME="32">424</A></TD><TD> * @param game Solitaire</TD></TR><TR><TD CLASS="l">425</TD><TD> */</TD></TR><TR><TD CLASS="l">426</TD><TD>public void initialize(Solitaire game) {</TD></TR><TR><TD CLASS="l">427</TD><TD> </TD></TR><TR CLASS="c"><TD CLASS="l">428</TD><TD>        activeGame = game;</TD></TR><TR><TD CLASS="l">429</TD><TD>        </TD></TR><TR><TD CLASS="l">430</TD><TD>        // resize GameWindow to fit the size of the Solitaire preferred size.</TD></TR><TR CLASS="c"><TD CLASS="l">431</TD><TD>        java.awt.Dimension d = game.getPreferredSize();</TD></TR><TR CLASS="c"><TD CLASS="l">432</TD><TD>        setSize (d);</TD></TR><TR><TD CLASS="l">433</TD><TD>        </TD></TR><TR><TD CLASS="l">434</TD><TD>        // Get Game Container and initialize game within it. Make sure</TD></TR><TR><TD CLASS="l">435</TD><TD>        // that container is as large as preferred size of solitaire...</TD></TR><TR CLASS="c"><TD CLASS="l">436</TD><TD>        Container cont = getGameContainer();</TD></TR><TR CLASS="c"><TD CLASS="l">437</TD><TD>        cont.setBounds(0, 0, Math.max(764, d.width), Math.max(512, d.height));</TD></TR><TR><TD CLASS="l">438</TD><TD>        </TD></TR><TR CLASS="c"><TD CLASS="l">439</TD><TD>        cont.initialize (game);</TD></TR><TR><TD CLASS="l">440</TD><TD> </TD></TR><TR><TD CLASS="l">441</TD><TD>        // Default Visitor (if one not already set)</TD></TR><TR CLASS="c"><TD CLASS="l">442</TD><TD>        if (cont.getVisitor() == null) {</TD></TR><TR CLASS="z"><TD CLASS="l">443</TD><TD>                cont.setVisitor (new BackgroundCopier(cont.getGraphics(), cont.getBackground()));</TD></TR><TR><TD CLASS="l">444</TD><TD>        }</TD></TR><TR><TD CLASS="l">445</TD><TD> </TD></TR><TR><TD CLASS="l">446</TD><TD>        // wire up mouse listeners (both motion and regular). All mouse events</TD></TR><TR><TD CLASS="l">447</TD><TD>        // are first sent to the container, and then to the game itself.</TD></TR><TR CLASS="c"><TD CLASS="l">448</TD><TD>        cont.addMouseListener (ivjEventHandler);</TD></TR><TR CLASS="c"><TD CLASS="l">449</TD><TD>        cont.addMouseMotionListener (ivjEventHandler);</TD></TR><TR CLASS="c"><TD CLASS="l">450</TD><TD>        cont.setCurrentUser(currentUser);</TD></TR><TR CLASS="c"><TD CLASS="l">451</TD><TD>}</TD></TR><TR><TD CLASS="l">452</TD><TD> </TD></TR><TR><TD CLASS="l">453</TD><TD> </TD></TR><TR><TD CLASS="l">454</TD><TD> </TD></TR><TR><TD CLASS="l"><A NAME="35">455</A></TD><TD>/**</TD></TR><TR><TD CLASS="l">456</TD><TD> * Return the height to offset our GUI elements (if any)</TD></TR><TR><TD CLASS="l">457</TD><TD> */</TD></TR><TR><TD CLASS="l">458</TD><TD>public int offsetHeight () {</TD></TR><TR CLASS="c"><TD CLASS="l">459</TD><TD>        int newHeight = getBounds().height;</TD></TR><TR CLASS="p"><TD CLASS="l" TITLE="80% line coverage (8 out of 10 instructions)">460</TD><TD TITLE="80% line coverage (8 out of 10 instructions)">        if (newHeight &lt; initialHeight) return 0;  // no change.</TD></TR><TR><TD CLASS="l">461</TD><TD> </TD></TR><TR><TD CLASS="l">462</TD><TD>        // return the amount to offset each GUI widget.</TD></TR><TR CLASS="c"><TD CLASS="l">463</TD><TD>        int diff = newHeight - lastHeight;</TD></TR><TR CLASS="c"><TD CLASS="l">464</TD><TD>        lastHeight = newHeight;</TD></TR><TR CLASS="c"><TD CLASS="l">465</TD><TD>        return diff;</TD></TR><TR><TD CLASS="l">466</TD><TD>}</TD></TR><TR><TD CLASS="l"><A NAME="36">467</A></TD><TD>/**</TD></TR><TR><TD CLASS="l">468</TD><TD> * Return the width to offset our GUI elements (if any)</TD></TR><TR><TD CLASS="l">469</TD><TD> */</TD></TR><TR><TD CLASS="l">470</TD><TD>public int offsetWidth () {</TD></TR><TR CLASS="c"><TD CLASS="l">471</TD><TD>        int newWidth = getBounds().width;</TD></TR><TR CLASS="p"><TD CLASS="l" TITLE="80% line coverage (8 out of 10 instructions)">472</TD><TD TITLE="80% line coverage (8 out of 10 instructions)">        if (newWidth &lt; initialWidth) return 0;  // no change.</TD></TR><TR><TD CLASS="l">473</TD><TD> </TD></TR><TR><TD CLASS="l">474</TD><TD>        // return the amount to offset each GUI widget.</TD></TR><TR CLASS="c"><TD CLASS="l">475</TD><TD>        int diff = newWidth - lastWidth;</TD></TR><TR CLASS="c"><TD CLASS="l">476</TD><TD>        lastWidth = newWidth;</TD></TR><TR CLASS="c"><TD CLASS="l">477</TD><TD>        return diff;</TD></TR><TR><TD CLASS="l">478</TD><TD>}</TD></TR><TR><TD CLASS="l">479</TD><TD> </TD></TR><TR><TD CLASS="l">480</TD><TD> </TD></TR><TR><TD CLASS="l">481</TD><TD> </TD></TR><TR><TD CLASS="l"><A NAME="2f">482</A></TD><TD>/**</TD></TR><TR><TD CLASS="l">483</TD><TD> * Set the skin for this GameWindow...</TD></TR><TR><TD CLASS="l">484</TD><TD> */</TD></TR><TR><TD CLASS="l">485</TD><TD>public void setSkin (String skinChoice) {</TD></TR><TR CLASS="z"><TD CLASS="l">486</TD><TD>        Container cont = getGameContainer();</TD></TR><TR><TD CLASS="l">487</TD><TD> </TD></TR><TR><TD CLASS="l">488</TD><TD>        // Default Visitor (if one not already set)</TD></TR><TR CLASS="z"><TD CLASS="l">489</TD><TD>        if (skinChoice.equals (SkinCatalog.STANDARD_SKIN)) {</TD></TR><TR CLASS="z"><TD CLASS="l">490</TD><TD>                cont.setVisitor (new BackgroundCopier(cont.getGraphics(), cont.getBackground()));</TD></TR><TR CLASS="z"><TD CLASS="l">491</TD><TD>        } else if (skinChoice.equals (SkinCatalog.SCROLLING_BALLOONS)) {</TD></TR><TR CLASS="z"><TD CLASS="l">492</TD><TD>                java.net.URL u = this.getClass().getResource (&#34;/backgrounds/FloatingImage.gif&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">493</TD><TD>                java.awt.Image image = createBackgroundImage (u);</TD></TR><TR CLASS="z"><TD CLASS="l">494</TD><TD>                if (image != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">495</TD><TD>                        cont.setVisitor (new ImageScroller(image, cont));</TD></TR><TR><TD CLASS="l">496</TD><TD>                } else {</TD></TR><TR CLASS="z"><TD CLASS="l">497</TD><TD>                        System.err.println (&#34;Unable to create ImageScroller.&#34;);</TD></TR><TR><TD CLASS="l">498</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l">499</TD><TD>        } else if (skinChoice.equals (SkinCatalog.FIXED_IMAGE)) {</TD></TR><TR CLASS="z"><TD CLASS="l">500</TD><TD>                java.net.URL u = this.getClass().getResource (&#34;/backgrounds/FloatingImage.gif&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">501</TD><TD>                java.awt.Image image = createBackgroundImage (u);</TD></TR><TR CLASS="z"><TD CLASS="l">502</TD><TD>                if (image != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">503</TD><TD>                        cont.setVisitor (new ImageCopier(image, cont, cont.getGraphics()));</TD></TR><TR><TD CLASS="l">504</TD><TD>                } else {</TD></TR><TR CLASS="z"><TD CLASS="l">505</TD><TD>                        System.err.println (&#34;Unable to create ImageCopier.&#34;);</TD></TR><TR><TD CLASS="l">506</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l">507</TD><TD>        } else if (skinChoice.equals (SkinCatalog.BOUNCING_BALLS)) {</TD></TR><TR CLASS="z"><TD CLASS="l">508</TD><TD>                cont.setVisitor (new BouncingBalls (cont));</TD></TR><TR CLASS="z"><TD CLASS="l">509</TD><TD>        } else if (skinChoice.equals (SkinCatalog.PSYCHADELIC)) {</TD></TR><TR CLASS="z"><TD CLASS="l">510</TD><TD>                cont.setVisitor (new Psychedelic (cont, cont.getBackground()));</TD></TR><TR CLASS="z"><TD CLASS="l">511</TD><TD>        } else if (skinChoice.equals (SkinCatalog.MULTIPLE_BOUNCING_BALLS)) {</TD></TR><TR CLASS="z"><TD CLASS="l">512</TD><TD>                cont.setVisitor (new BouncingBalls (cont, true));</TD></TR><TR><TD CLASS="l">513</TD><TD>        }</TD></TR><TR CLASS="z"><TD CLASS="l">514</TD><TD>}</TD></TR><TR><TD CLASS="l">515</TD><TD> </TD></TR><TR><TD CLASS="l">516</TD><TD> </TD></TR><TR><TD CLASS="l">517</TD><TD>/**</TD></TR><TR><TD CLASS="l">518</TD><TD> * This method initializes ivjnewGame        </TD></TR><TR><TD CLASS="l"><A NAME="3b">519</A></TD><TD> *         </TD></TR><TR><TD CLASS="l">520</TD><TD> * @return java.awt.Button        </TD></TR><TR><TD CLASS="l">521</TD><TD> */</TD></TR><TR><TD CLASS="l">522</TD><TD>private Button getnewGame() {</TD></TR><TR CLASS="c"><TD CLASS="l">523</TD><TD>        if (ivjnewGame == null) {</TD></TR><TR CLASS="c"><TD CLASS="l">524</TD><TD>                ivjnewGame = new Button();</TD></TR><TR CLASS="c"><TD CLASS="l">525</TD><TD>                ivjnewGame.setBounds(new Rectangle(12, 12, 72, 23));</TD></TR><TR CLASS="c"><TD CLASS="l">526</TD><TD>                ivjnewGame.setActionCommand(&#34;&#34;);</TD></TR><TR CLASS="c"><TD CLASS="l"><A NAME="16">527</A></TD><TD>                ivjnewGame.setLabel(&#34;New Hand&#34;);</TD></TR><TR CLASS="c"><TD CLASS="l">528</TD><TD>                ivjnewGame.setName(&#34;newGame&#34;);</TD></TR><TR CLASS="c"><TD CLASS="l">529</TD><TD>                ivjnewGame.addActionListener(new java.awt.event.ActionListener() {</TD></TR><TR><TD CLASS="l">530</TD><TD>                        public void actionPerformed(java.awt.event.ActionEvent e) {</TD></TR><TR CLASS="z"><TD CLASS="l">531</TD><TD>                                Container cont = getGameContainer();</TD></TR><TR CLASS="z"><TD CLASS="l">532</TD><TD>                                cont.forceNextHand();</TD></TR><TR CLASS="z"><TD CLASS="l">533</TD><TD>                        }</TD></TR><TR><TD CLASS="l">534</TD><TD>                });</TD></TR><TR><TD CLASS="l">535</TD><TD>        }</TD></TR><TR CLASS="c"><TD CLASS="l">536</TD><TD>        return ivjnewGame;</TD></TR><TR><TD CLASS="l"><A NAME="2d">537</A></TD><TD>}</TD></TR><TR><TD CLASS="l">538</TD><TD> </TD></TR><TR><TD CLASS="l">539</TD><TD> </TD></TR><TR><TD CLASS="l">540</TD><TD>public void incrementNumNewHands() {</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="2e">541</A></TD><TD>        System.out.println (&#34;GamePanel: numNewHands++&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">542</TD><TD>}</TD></TR><TR><TD CLASS="l">543</TD><TD> </TD></TR><TR><TD CLASS="l">544</TD><TD>public void incrementNumWins() {</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="30">545</A></TD><TD>        System.out.println (&#34;GamePanel: numWins++&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">546</TD><TD>}</TD></TR><TR><TD CLASS="l">547</TD><TD> </TD></TR><TR><TD CLASS="l">548</TD><TD>public void updateScore(int score) {</TD></TR><TR CLASS="z"><TD CLASS="l">549</TD><TD>        System.out.println (&#34;updateScore:&#34; + score);</TD></TR><TR CLASS="z"><TD CLASS="l">550</TD><TD>}</TD></TR><TR><TD CLASS="l">551</TD><TD>}</TD></TR></TABLE><P></P><TABLE CLASS="hdft" CELLSPACING="0" WIDTH="100%"><TR><TD CLASS="nv">[<A HREF="../Framework-12-17.html">all classes</A>][<A HREF="20.html">ks.client.gamefactory</A>]</TD></TR><TR><TD CLASS="tl"><A HREF="http://www.eclemma.org/support.html">EMMA 2.0.5312 EclEmma Fix 1</A> (C) Vladimir Roubtsov</TD></TR></TABLE></BODY></HTML>